/*
 * CompresorFactory.cpp
 *
 *  Created on: Jun 15, 2014
 *      Author: carlos
 */

#include "CompresorFactory.h"

CompresorFactory::CompresorFactory() {

}

ICompresor* CompresorFactory::getCompresor(const string tipoCompresor) {

	static LZ77 lz77;
	static LZ78 lz78;
	static LZHUFF lzhuff;

	if (LZ77C == tipoCompresor) {
		return &lz77;
	}
	else if (LZ78C == tipoCompresor) {
		return &lz78;
	}
	else if (LZHUFFC == tipoCompresor) {
		return &lzhuff;
	}
	return NULL;
}

CompresorFactory::~CompresorFactory() {
}

